<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class ChargeRecordsTableAddTimeLimitColumn extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('charge_records', function (Blueprint $table) {
            $table->integer('time_limit')->default(0);
            $table->tinyInteger('recharge_mode')->default(2);
            $table->integer('discharge_time')->default(0);
            $table->integer('days')->default(0);
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('charge_records', function (Blueprint $table) {
            $table->dropColumn('time_limit');
            $table->dropColumn('recharge_mode');
            $table->dropColumn('discharge_time');
            $table->dropColumn('days');
        });
    }
}
